package cn.test.rabbitmq.spring;

import cn.test.MqBean;
import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter;

/**
 * @author hanchao
 * @date 2017/7/3 18:31
 */
//也可以不继承，直接写实现类，或者集成MesageListener
public class MessageConsumer extends MessageListenerAdapter {

    public void handleMessage(MqBean mqBean){
        System.out.println(mqBean);
        throw new IllegalArgumentException("gungun");
    }
}
